using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using VB_ObjetosdeNegocio.BO;
using HistoriaLaboral.ABM;

namespace HistoriaLaboral.AltaPersonas
{
    public partial class frmAreasInteres : AgenciaEmpleo.Plantillas.frmMoldeAltaSimple
    {
        public frmAreasInteres()
        {
            InitializeComponent();
            Cargar();
        }

      

        private void Cargar()
        {
            tAreas mAreas = new tAreas();
            cboxAreas.DataSource = mAreas.TraerTodos().Tables[0];
            cboxAreas.DisplayMember = tAreasColumnas.cNombre.ToString();
            cboxAreas.ValueMember = tAreasColumnas.IdAreas.ToString();
        }

        private void btnNuevaArea_Click(object sender, EventArgs e)
        {
            frmAltaArea frm = new frmAltaArea();
            if (frm.ShowDialog() == DialogResult.OK)
            {
                Cargar();
                cboxAreas.Text = frm.txtNombreArea.Text;
            }
        }

        
        

        

    }
}

